<?php
// +----------------------------------------------------------------------
// | INPHP
// +----------------------------------------------------------------------
// | Copyright (c) 2021 https://inphp.cc All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/MIT )
// +----------------------------------------------------------------------
// | Author: lulanyin <me@lanyin.lu>
// +----------------------------------------------------------------------
// |                               消息测试
// +----------------------------------------------------------------------
namespace app\simple\ws\chat;

use Inphp\Service\Object\Message;

class index
{
    public function index(Message $message, $server, $frame)
    {
        //echo "hi";
        //$server->push($frame->fd, websocketMessage($message->event, 0, "我已收到您的消息", $message->toJson())->toJson());
        
        return websocketMessage("chat", 0, "我收到你的消息了");
    }
}